package cn.test;

import cn.test.conf.DubboConfig;
import cn.test.conf.DubboServices;
import cn.test.conf.SpringConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @auther hanchao
 * @date 2016/11/9 17:01
 */
@EnableAutoConfiguration
public class App {


    public static void main(String[] args) {

        //查看所有类，并没有注册到spring容器中，只是生成以后交给了包含该注释的类
        //new SpringApplicationBuilder().sources(SpringConfig.class).web(false).run(args);
        ConfigurableApplicationContext application = SpringApplication.run(new Object[]{SpringConfig.class, DubboConfig.class,DubboServices.class}, args);
        //DubboServices dubboServices = application.getBean(DubboServices.class);
        //System.out.println(application.getBean(DubboServices.class).helloService());
        System.out.println("==============");
        //System.out.println(dubboServices.getHelloService());
    }
}
